<?php

use Hyperf\Database\Schema\Schema;
use Hyperf\Database\Schema\Blueprint;
use Hyperf\Database\Migrations\Migration;

class CreateAccostLogsTable extends Migration
{
    protected $connection = 'stat';
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('accost_logs', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->default(0)->comment('用户ID');
            $table->integer('chat_user_id')->default(0)->comment('搭讪用户的ID');
            $table->integer('expires_time')->default(0)->comment('过期时间');
            $table->date('dt')->comment('日期');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('accost_logs');
    }
}
